﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;

namespace Acme.BookStore2
{
    public interface IVehicleRepository : IBasicRepository<Vehicle, Guid>
    {
        Task<List<Vehicle>> GetPagedListAsync(
            string sorting = null,
            int maxResultCount = int.MaxValue,
            int skipCount = 0,
            string number = null,
            string licensePlateNumber = null,
            bool? isMaintaining = null,
            bool includeDetails = false,
            CancellationToken cancellationToken = default);

        Task<long> GetCountAsync(
            string number = null,
            string licensePlateNumber = null,
            bool? isMaintaining = null,
            CancellationToken cancellationToken = default);

        Task<bool> AnyAsync(
            Expression<Func<Vehicle, bool>> predicate,
            Guid? ignoredId = null,
            CancellationToken cancellationToken = default);
    }
}